﻿<template>
  <baseUI :isShow="myConfig.isShow" :label="myConfig.label" :showLabel="myConfig.showLabel"
  :labelSpan="myConfig.labelSpan" :isRequired="myConfig.isRequired" :showErrMsg="showErrMsg" :errMsg="errMsg"
  :commonConfig="commonConfig">
    <el-switch
      style="display: block"
      v-model="selectedValue"
      :active-color="myConfig.other.activeColor ? myConfig.other.activeColor:'#13ce66'"
      :inactive-color="myConfig.other.inactiveColor ? myConfig.other.inactiveColor : '#ff4949'"
      :active-text="myConfig.other.activeText"
      :inactive-text="myConfig.other.inactiveText"
      @change="handleChange">
    </el-switch>
  </baseUI>
</template>
<script>
import baseComponent from '../baseComponent.vue'
import baseUI from '../baseUI.vue'
export default {
  components: {
    baseComponent, baseUI
  },
  extends: baseComponent,
  mounted () {
  },
  data () {
    return {
    }
  },
  methods: {
    isDataComponent () {
      return true
    },
    handleChange () {
      this.onChange()
    }
  }
}
</script>
<style>
</style>
